package com.xiyoukt.springboot.util;

import com.xiyoukt.springboot.Result;

public class ResultUtil<T> {

    public Result<T> success(T data){
        Result<T> result = new Result<>();
        result.setCode(200);
        result.setData(data);
        return result;
    }

    public Result<T> fail(Integer code, String message){
        Result<T> result = new Result<>();
        result.setCode(code);
        result.setMessage(message);
        return result;
    }

}
